import { BrowserRouter, NavLink, Route } from "react-router-dom";
import "../../style/school_header.scss";
import Home from "../home/Index";

const Index = () => {
  return (
    <div style={{ background: "#f9f9f9" }}>
      <BrowserRouter>
        <div className="header flex">
          <img
            src="https://funimg.pddpic.com/career/img/pdd_logo_1.png.slim.png"
            className="header_logo"
            alt=""
          />
          <div className="header_navlink">
            <ul className="flex">
              <li>
                <NavLink to="/home" activeStyle={{ color: "red" }}>
                  首页
                </NavLink>
              </li>
              <li>
                <NavLink to="/studentIng" activeStyle={{ color: "red" }}>
                  应届生招聘
                </NavLink>
              </li>
              <li>
                <NavLink to="/studentNew" activeStyle={{ color: "red" }}>
                  实习生招聘
                </NavLink>
              </li>
              <li>
                <NavLink to="/meCenter" activeClassName="header_act">
                  个人中心
                </NavLink>
              </li>
              <li>
                <NavLink to="/about" activeStyle={{ color: "red" }}>
                  关于我们
                </NavLink>
              </li>
            </ul>
          </div>
          <div className="header_loginreg">
            <NavLink to="/loginreg">登录/注册</NavLink>
          </div>
        </div>
        <Route path="/" exact component={Home} />
        <Route path="/home" exact component={Home} />
        <Route path="/studentIng" component={() => <div>StudentIng</div>} />
        <Route path="/studentNew" component={() => <div>StudentNew</div>} />
        <Route path="/meCenter" component={() => <div>MeCenter</div>} />
        <Route path="/about" component={() => <div>About</div>} />
        <Route path="/loginreg" component={() => <div>Loginreg</div>} />
      </BrowserRouter>
    </div>
  );
};

export default Index;
